package com.patterns.composite.corpTree;

/**
 * @Creation_time 2017/7/17
 * @Theme 抽象公司职员类
 * @Autor Xiao Yiyun
 */
public abstract class Corp {
    private String name = "";
    private String position = "";
    private int salary = 0;
    public Corp(String name, String position, int salary) {
        this.name = name;
        this.position = position;
        this.salary = salary;
    }
    //获得员工信息
    public String getInfo() {
        return "Corp{" +
                "name='" + name + '\'' +
                ", position='" + position + '\'' +
                ", salary=" + salary +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
